let initialState = false //用于控制loading组件

export default function (state = initialState,  action) {

    let { type, payload } = action;

    switch (type) {
        case "FETCH_CART_FAILD": //请求成功 返回状态
            return false //请求失败,不能显示正在请求
        case "FETCH_CART_SUCCESS":
            return false //请求成功,不能显示正在请求
        case "FETCH_CART_REQUEST":
            return true //正在发送请求,要显示正在请求
        default:
            return state
    }

}